<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="user" class="entity.User" scope="session"/>
<jsp:useBean id="appointment" class="entity.Appointment" scope="session"/>
<jsp:useBean id="users" class="java.util.ArrayList" scope="request"/>

<html>
	<head>
		<title>Recreation Manager -Dodavanje učesnika</title>
		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="theme.css">
		<script type="text/javascript" src="scripts/linkfader.js"></script>	
	</head>
	<c:if test="${user.type!='A'}">
		<c:redirect url="./main.jsp" />
	</c:if>
	<body>
	<center>
	<c:import url="./header.jsp"></c:import>
	<table class="mainTable">
		<tr>
			<td width="200px" valign="top">
				<c:import url="./menu.jsp"></c:import>
			</td>			
			<td valign="top">
			<!-- itt kezdodik -->
			<table class="list">
				<thead>
					<tr>
						<th colspan="4"><h2>Dodavanje učesnika</h2></th>
					</tr>
					<tr>
						<th>Ime:</th>
						<th>Prezime:</th>
						<th>Dodavanje:</th>
						<th>&nbsp;</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${users}" var="usr">
						<tr>
							<td>${usr.firstName}</td>
							<td>${usr.lastName}</td>
							<td>${usr.email}</td>
							<td><a href="./AdminMatch?appId=${appointment.appointmentId}&idUsr=${usr.userId}&adding=true">Dodavanje</a></td>					
						</tr>
					</c:forEach>
					<tr>
						<td colspan="4">&nbsp;</td>
					</tr>
					<tr>
						<td colspan="4" align="left"><a href="./AdminMatch?appId=${appointment.appointmentId}">&lt;&lt; Nazad</a></td>
					</tr>
				</tbody>		
			</table>
			<!-- itt vegzodik -->
			</td>
		</tr>
	</table>
		
		
		
		</center>
	</body>	
</html>